package com.ytd.smartcanteen.weighting.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.ytd.common.util.LogUtil;
import com.ytd.smartcanteen.weighting.MainActivity;

import java.util.Objects;


public class ClearReceiver extends BroadcastReceiver {
    MainActivity mMainActivity;

    public ClearReceiver(MainActivity activity) {
        mMainActivity = activity;
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        if (Objects.equals("com.win.action.WIN_BROADCAST", intent.getAction())) {
            LogUtil.e("ClearReceiver 取消预警");
            mMainActivity.setIsAnomaly(false);
        }
    }
}